import json
import locale


def read_json(file_name) -> dict:
    with open(file_name) as f:
        d = json.load(f)
        return d


def write_json(file_name, data):
    with open(file_name, "w", encoding="utf-8") as f:
        try:
            json.dump(data, f, ensure_ascii=False, indent=4)
            return True
        except BaseException:
            exit(1)


path = "/home/arksm/ubl-settings-manager_gtk"
lang_os = locale.getdefaultlocale()[0]

